<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="author" content="thanhansoft" />
<meta name="keywords" content="{DTITLE} {TITLEWEB} {KEYWORD} {SITE_NAME}" />
<meta name="description" content="{DTITLE} {TITLEWEB} {KEYWORD} {SITE_NAME}" />
<link type="text/css" rel="stylesheet" href="<?php echo TEMPLATE_ADMIN ?>/css/dosvn.css" />
<link rel="SHORTCUT ICON" href="<?php echo TEMPLATE_ADMIN ?>/images/favicon.ico" type="image/x-icon" />
<link rel="icon" href="<?php echo TEMPLATE_ADMIN ?>/images/favicon.ico" type="image/gif" />
<title>{DTITLE} {TITLEWEB}</title>
<!--[if IE]>
<style>
    fieldset {position: relative; margin-top:10px}
    legend {position: absolute;	top: -0.8em; left: 1.4em; color:#720E3B; font-weight:bold; font-size:10pt}
</style>
<![endif]-->
</head>
<body>
<div id="wapper">
	<a href="./"><img src="<?php echo TEMPLATE_ADMIN ?>/images/logo.png" alt="Logo" class="logo" /></a>
	<div id="header">
    	<ul>
            <li>Chào <span><?php echo $_SESSION['useradmin']; ?></span></li>
            <li><a href="../">Website</a></li>
        	<li><a href="#">Quản lý tài khoản</a></li>
            <li><a href="?model=login&amp;func=logout">Đăng xuất</a></li>
    	</ul>
    </div>
	<div class="menu-left">
        <h1 class="ico">Danh sách Module</h1>
        <ul class="menu">
            <?php 
                $rows = $this->loadModule();
                $rowsize = count($rows);
                for($i = 1; $i <= $rowsize; $i++){
                    echo '<li><a href="?model='.$rows[$i]['model_id'].'">'.$rows[$i]['model_id'].'</a></li>';
                }
            ?>
        </ul>
        <h1 class="ico">Danh sách Module</h1>
        <ul class="menu">
            <li><a href="?model=setting&amp;func=add">Cấu hình web</a></li>
            <li><a href="?model=setting&amp;func=add">Cấu hình module</a></li>
            <li><a href="?model=setting&amp;func=add">Function module</a></li>
        </ul>
	</div>
	<div id="content">
    	<div class="contenter">
            <?php 
                if(isset($modellist)){
                    echo '<form name="frmaddpost" id="frmaddpost" action="?model=setting&amp;func=submitadd" method="post" class="form">
                        	<fieldset>
                        		<legend>Thêm mới module</legend>
                                <div class="input_field">
                    				<label for="modelname">Tên module: </label>
                    				<input maxlength="20" class="tinyfield" name="modelname" id="modelname" type="text" value="" />
                    				<span class="field_desc"></span>
                    			</div>
                                <div class="input_field">
                    				<label for="modelload">Module load: </label>
                    				<ul class="modelload">';
                    if(count($modellist) > 0){
                        while (list($key, $value) = each($modellist)) {
                            echo '<li><label for="l'.$value['model_id'].'">'.$value['model_id'].'</label> <input type="checkbox" name="modelload[]" id="l'.$value['model_id'].'" value="'.$value['model_id'].'" style="margin-top:5px" /> <div class="clear"></div></li>';
                        }
                    }
                    echo '</ul>
            				<span class="field_desc"></span>
            			</div>
                        <div class="input_field">
            				<label for="fuser">File Front-end: </label>
            				<input type="file" name="fuser" id="fuser" />
            				<span class="field_desc"></span>
            			</div>
                        <div class="input_field">
            				<label for="fadmin">File Back-end: </label>
            				<input type="file" name="fadmin" id="fadmin" />
            				<span class="field_desc"></span>
            			</div>
                        <div class="input_field">
            				<label for="tenctyvn">&nbsp;</label>
            				<input type="submit" name="btnaddmodel" value="  Thực hiện  " class="login" />
            			</div>
                    </fieldset>
                    </form>';
                }
            ?>
			<?php echo $artigos; ?>
            <?php echo $welcome; ?>
		</div>
        <div id="footer"><div>Copyright &copy; 2011 by Dos.vn. All rights reserved</div></div>
    </div>
</div>
</body>
</html>